<?php /* Smarty version 2.6.14, created on 2012-10-20 22:30:51
         compiled from imobile_browse_groups.tpl */
?><?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'count', 'imobile_browse_groups.tpl', 54, false),array('function', 'math', 'imobile_browse_groups.tpl', 63, false),)), $this);
?><?php
SELanguage::_preload_multi(11340063,11340057,11340059,2000127,2000128,2000129,2000130,2000131,11340060,2000132,182,183,184,185);
SELanguage::load();
?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'imobile_header.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<div id="topbar">
  <div id="leftnav">
    <a href="user_home.php"><img alt="home" src="./include/imobile/iwebkit/images/home.png" /></a>
  </div> 
  <div id="title"> 
    <?php echo SELanguage::_get(11340063); ?>
  </div>
  <div id="bluerightbutton"><a href="javascript:iMobile_toggleFilter('#content','#contentlist');"><?php echo SELanguage::_get(11340057); ?></a></div>
</div>

<div id="content" style="display: none">
  
  <span class="graytitle"><?php echo SELanguage::_get(11340059); ?></span>
  <form action="browse_groups.php" action="POST">
  <ul class="pageitem"> 
    <li class="select">
       <select name='v'>
		      <option value='0'<?php if ($this->_tpl_vars['v'] == '0'): ?> SELECTED<?php endif; ?>><?php echo SELanguage::_get(2000127); ?></option>
		      <?php if ($this->_tpl_vars['user']->user_exists): ?><option value='1'<?php if ($this->_tpl_vars['v'] == '1'): ?> SELECTED<?php endif; ?>><?php echo SELanguage::_get(2000128); ?></option><?php endif; ?>
       </select>
    </li>
    <li class="select">
       <select name='s'>
        <option value='group_totalmembers DESC'<?php if ($this->_tpl_vars['s'] == 'group_totalmembers DESC'): ?> SELECTED<?php endif; ?>><?php echo SELanguage::_get(2000129); ?></option>
        <option value='group_datecreated DESC'<?php if ($this->_tpl_vars['s'] == 'group_datecreated DESC'): ?> SELECTED<?php endif; ?>><?php echo SELanguage::_get(2000130); ?></option>
       </select>
    </li>
    <li class="select">
       <select name='groupcat_id'>
        <option value=""><?php echo SELanguage::_get(2000131); ?></option>
         <?php unset($this->_sections['cat_loop']);
$this->_sections['cat_loop']['name'] = 'cat_loop';
$this->_sections['cat_loop']['loop'] = is_array($_loop=$this->_tpl_vars['cats']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['cat_loop']['show'] = true;
$this->_sections['cat_loop']['max'] = $this->_sections['cat_loop']['loop'];
$this->_sections['cat_loop']['step'] = 1;
$this->_sections['cat_loop']['start'] = $this->_sections['cat_loop']['step'] > 0 ? 0 : $this->_sections['cat_loop']['loop']-1;
if ($this->_sections['cat_loop']['show']) {
    $this->_sections['cat_loop']['total'] = $this->_sections['cat_loop']['loop'];
    if ($this->_sections['cat_loop']['total'] == 0)
        $this->_sections['cat_loop']['show'] = false;
} else
    $this->_sections['cat_loop']['total'] = 0;
if ($this->_sections['cat_loop']['show']):

            for ($this->_sections['cat_loop']['index'] = $this->_sections['cat_loop']['start'], $this->_sections['cat_loop']['iteration'] = 1;
                 $this->_sections['cat_loop']['iteration'] <= $this->_sections['cat_loop']['total'];
                 $this->_sections['cat_loop']['index'] += $this->_sections['cat_loop']['step'], $this->_sections['cat_loop']['iteration']++):
$this->_sections['cat_loop']['rownum'] = $this->_sections['cat_loop']['iteration'];
$this->_sections['cat_loop']['index_prev'] = $this->_sections['cat_loop']['index'] - $this->_sections['cat_loop']['step'];
$this->_sections['cat_loop']['index_next'] = $this->_sections['cat_loop']['index'] + $this->_sections['cat_loop']['step'];
$this->_sections['cat_loop']['first']      = ($this->_sections['cat_loop']['iteration'] == 1);
$this->_sections['cat_loop']['last']       = ($this->_sections['cat_loop']['iteration'] == $this->_sections['cat_loop']['total']);
?>
          <option value="<?php echo $this->_tpl_vars['cats'][$this->_sections['cat_loop']['index']]['cat_id']; ?>
" <?php if ($this->_tpl_vars['groupcat_id'] == $this->_tpl_vars['cats'][$this->_sections['cat_loop']['index']]['cat_id']): ?>selected='selected'<?php endif; ?> ><?php echo SELanguage::_get($this->_tpl_vars['cats'][$this->_sections['cat_loop']['index']]['cat_title']); ?></option>
            <?php unset($this->_sections['subcat_loop']);
$this->_sections['subcat_loop']['name'] = 'subcat_loop';
$this->_sections['subcat_loop']['loop'] = is_array($_loop=$this->_tpl_vars['cats'][$this->_sections['cat_loop']['index']]['subcats']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['subcat_loop']['show'] = true;
$this->_sections['subcat_loop']['max'] = $this->_sections['subcat_loop']['loop'];
$this->_sections['subcat_loop']['step'] = 1;
$this->_sections['subcat_loop']['start'] = $this->_sections['subcat_loop']['step'] > 0 ? 0 : $this->_sections['subcat_loop']['loop']-1;
if ($this->_sections['subcat_loop']['show']) {
    $this->_sections['subcat_loop']['total'] = $this->_sections['subcat_loop']['loop'];
    if ($this->_sections['subcat_loop']['total'] == 0)
        $this->_sections['subcat_loop']['show'] = false;
} else
    $this->_sections['subcat_loop']['total'] = 0;
if ($this->_sections['subcat_loop']['show']):

            for ($this->_sections['subcat_loop']['index'] = $this->_sections['subcat_loop']['start'], $this->_sections['subcat_loop']['iteration'] = 1;
                 $this->_sections['subcat_loop']['iteration'] <= $this->_sections['subcat_loop']['total'];
                 $this->_sections['subcat_loop']['index'] += $this->_sections['subcat_loop']['step'], $this->_sections['subcat_loop']['iteration']++):
$this->_sections['subcat_loop']['rownum'] = $this->_sections['subcat_loop']['iteration'];
$this->_sections['subcat_loop']['index_prev'] = $this->_sections['subcat_loop']['index'] - $this->_sections['subcat_loop']['step'];
$this->_sections['subcat_loop']['index_next'] = $this->_sections['subcat_loop']['index'] + $this->_sections['subcat_loop']['step'];
$this->_sections['subcat_loop']['first']      = ($this->_sections['subcat_loop']['iteration'] == 1);
$this->_sections['subcat_loop']['last']       = ($this->_sections['subcat_loop']['iteration'] == $this->_sections['subcat_loop']['total']);
?>
              <option value="<?php echo $this->_tpl_vars['cats'][$this->_sections['cat_loop']['index']]['subcats'][$this->_sections['subcat_loop']['index']]['subcat_id']; ?>
" <?php if ($this->_tpl_vars['groupcat_id'] == $this->_tpl_vars['cats'][$this->_sections['cat_loop']['index']]['subcats'][$this->_sections['subcat_loop']['index']]['subcat_id']): ?>selected='selected'<?php endif; ?>> - <?php echo SELanguage::_get($this->_tpl_vars['cats'][$this->_sections['cat_loop']['index']]['subcats'][$this->_sections['subcat_loop']['index']]['subcat_title']); ?></option>
            <?php endfor; endif; ?>
         <?php endfor; endif; ?>
       </select>
    </li>

  </ul>
  
    <div class="iButtons">
      <input name="submit" type="submit" value="<?php echo SELanguage::_get(11340060); ?>" class="iPush" /></li>
    </div>
  
  </form>
</div>

<div id="contentlist">


  <?php if (count($this->_tpl_vars['groups']) == 0): ?>
    
    <div class="boxinfo"> 
      <?php echo SELanguage::_get(2000132); ?>
    </div>  
  <?php else: ?>
  
  <div id="tributton"> 
    <div class="links"> 
      <?php if ($this->_tpl_vars['p'] != 1): ?><a href='browse_groups.php?s=<?php echo $this->_tpl_vars['s']; ?>
&v=<?php echo $this->_tpl_vars['v']; ?>
&groupcat_id=<?php echo $this->_tpl_vars['groupcat_id']; ?>
&p=<?php echo smarty_function_math(array('equation' => "p-1",'p' => $this->_tpl_vars['p']), $this);?>
'><?php echo SELanguage::_get(182); ?></a><?php else: ?><a href='browse_groups.php?s=<?php echo $this->_tpl_vars['s']; ?>
&v=<?php echo $this->_tpl_vars['v']; ?>
&groupcat_id=<?php echo $this->_tpl_vars['groupcat_id']; ?>
&p=1'><?php echo SELanguage::_get(182); ?></a><?php endif; ?><a href="browse_groups.php">Home</a><?php if ($this->_tpl_vars['p'] != $this->_tpl_vars['maxpage']): ?><a href='browse_groups.php?s=<?php echo $this->_tpl_vars['s']; ?>
&v=<?php echo $this->_tpl_vars['v']; ?>
&groupcat_id=<?php echo $this->_tpl_vars['groupcat_id']; ?>
&p=<?php echo smarty_function_math(array('equation' => "p+1",'p' => $this->_tpl_vars['p']), $this);?>
'><?php echo SELanguage::_get(183); ?></a><?php else: ?><a href='browse_groups.php?s=<?php echo $this->_tpl_vars['s']; ?>
&v=<?php echo $this->_tpl_vars['v']; ?>
&groupcat_id=<?php echo $this->_tpl_vars['groupcat_id']; ?>
&p=<?php echo $this->_tpl_vars['maxpage']; ?>
'><?php echo SELanguage::_get(183); ?></a><?php endif; ?>
      </div> 
  </div>   
    <div class="page_stats">
      <?php if ($this->_tpl_vars['p_start'] == $this->_tpl_vars['p_end']): ?>
        <?php echo sprintf(SELanguage::_get(184), $this->_tpl_vars['p_start'], $this->_tpl_vars['total_groups']); ?>
      <?php else: ?>
        <?php echo sprintf(SELanguage::_get(185), $this->_tpl_vars['p_start'], $this->_tpl_vars['p_end'], $this->_tpl_vars['total_groups']); ?>
      <?php endif; ?>
    </div>
    <ul class="records">  
    <?php unset($this->_sections['group_loop']);
$this->_sections['group_loop']['name'] = 'group_loop';
$this->_sections['group_loop']['loop'] = is_array($_loop=$this->_tpl_vars['groups']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['group_loop']['show'] = true;
$this->_sections['group_loop']['max'] = $this->_sections['group_loop']['loop'];
$this->_sections['group_loop']['step'] = 1;
$this->_sections['group_loop']['start'] = $this->_sections['group_loop']['step'] > 0 ? 0 : $this->_sections['group_loop']['loop']-1;
if ($this->_sections['group_loop']['show']) {
    $this->_sections['group_loop']['total'] = $this->_sections['group_loop']['loop'];
    if ($this->_sections['group_loop']['total'] == 0)
        $this->_sections['group_loop']['show'] = false;
} else
    $this->_sections['group_loop']['total'] = 0;
if ($this->_sections['group_loop']['show']):

            for ($this->_sections['group_loop']['index'] = $this->_sections['group_loop']['start'], $this->_sections['group_loop']['iteration'] = 1;
                 $this->_sections['group_loop']['iteration'] <= $this->_sections['group_loop']['total'];
                 $this->_sections['group_loop']['index'] += $this->_sections['group_loop']['step'], $this->_sections['group_loop']['iteration']++):
$this->_sections['group_loop']['rownum'] = $this->_sections['group_loop']['iteration'];
$this->_sections['group_loop']['index_prev'] = $this->_sections['group_loop']['index'] - $this->_sections['group_loop']['step'];
$this->_sections['group_loop']['index_next'] = $this->_sections['group_loop']['index'] + $this->_sections['group_loop']['step'];
$this->_sections['group_loop']['first']      = ($this->_sections['group_loop']['iteration'] == 1);
$this->_sections['group_loop']['last']       = ($this->_sections['group_loop']['iteration'] == $this->_sections['group_loop']['total']);
?>
        <li class="record">
          <a href="<?php echo $this->_tpl_vars['url']->url_create('group',@NULL,$this->_tpl_vars['groups'][$this->_sections['group_loop']['index']]['group']->group_info['group_id']); ?>
">
            <img class='photo' src='<?php echo $this->_tpl_vars['groups'][$this->_sections['group_loop']['index']]['group']->group_photo("./images/nophoto.gif",'TRUE'); ?>
' border='0' />
              <span class="name"><?php echo $this->_tpl_vars['groups'][$this->_sections['group_loop']['index']]['group']->group_info['group_title']; ?>
</span>
              <span class="arrow"></span>
          </a>
        </li>
    <?php endfor; endif; ?>
    </ul>

  <?php endif; ?>


</div>


<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'imobile_footer.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
